package com.joeshing.security.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;

/**
 * @author joeshing
 * @date 2012-11-27
 * 
 */
@Entity
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Table(name = "sys_user")
public class User implements java.io.Serializable {

	/**
	 * 用户状态：启用
	 */
	public static final int STATUS_ENABLE = 1;
	/**
	 * 用户状态：禁用
	 */
	public static final int STATUS_DISABLE = 0;
	/**
	 * 
	 */
	private static final long serialVersionUID = 3933221246369099173L;
	private String id;
	private String name;
	private String account;
	private String city;
	private String pwd;
	private String updateTime;
	private String updateIp;
	private String lastLoginTime;
	private String lastLoginIp;
	private String regTime;
	private String regIp;
	private String webqq;
	private Integer status;
	private Integer hide;

	public User() {
	}

	public User(String id) {
		this.id = id;
	}

	public User(String id, String name, String account, String city, String pwd, String updateTime, String updateIp, String lastLoginTime, String lastLoginIp, String regTime,
			String regIp, String webqq, Integer status, Integer hide) {
		super();
		this.id = id;
		this.name = name;
		this.account = account;
		this.city = city;
		this.pwd = pwd;
		this.updateTime = updateTime;
		this.updateIp = updateIp;
		this.lastLoginTime = lastLoginTime;
		this.lastLoginIp = lastLoginIp;
		this.regTime = regTime;
		this.regIp = regIp;
		this.webqq = webqq;
		this.status = status;
		this.hide = hide;
	}

	@Id
	@GeneratedValue(generator = "hibernate-uuid")
	@GenericGenerator(name = "hibernate-uuid", strategy = "uuid.hex")
	@Column(name = "id", unique = true, nullable = false, length = 32)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "name", length = 64)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "city", length = 64)
	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	@Column(name = "account", length = 64)
	public String getAccount() {
		return account;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	@Column(name = "pwd")
	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	@Column(name = "updateTime", length = 50)
	public String getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "updateIp", length = 64)
	public String getUpdateIp() {
		return this.updateIp;
	}

	public void setUpdateIp(String updateIp) {
		this.updateIp = updateIp;
	}

	@Column(name = "lastLoginTime", length = 50)
	public String getLastLoginTime() {
		return this.lastLoginTime;
	}

	public void setLastLoginTime(String lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	@Column(name = "lastLoginIp", length = 64)
	public String getLastLoginIp() {
		return this.lastLoginIp;
	}

	public void setLastLoginIp(String lastLoginIp) {
		this.lastLoginIp = lastLoginIp;
	}

	@Column(name = "regTime", length = 50)
	public String getRegTime() {
		return this.regTime;
	}

	public void setRegTime(String regTime) {
		this.regTime = regTime;
	}

	@Column(name = "regIp", length = 64)
	public String getRegIp() {
		return this.regIp;
	}

	public void setRegIp(String regIp) {
		this.regIp = regIp;
	}

	@Column(name = "webqq", length = 100)
	public String getWebqq() {
		return webqq;
	}

	public void setWebqq(String webqq) {
		this.webqq = webqq;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@Column(name = "hide")
	public Integer getHide() {
		return hide;
	}

	public void setHide(Integer hide) {
		this.hide = hide;
	}
}
